package ${conf.base_package}.${conf.provider_package};
<#-- beanName: supplier -->
<#-- beanName首字母大小:Supplier -->
<#assign beanName = table.beanName/>

<#assign beanNameUncap_first = beanName?uncap_first/>
<#assign propertysAndColumnInfos = table.propertysAndColumnInfos/>
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import ${conf.base_package}.${conf.bean_package}.${beanName};
import ${conf.base_package}.${conf.service_package}.I${beanName}Service;
import ${conf.base_package}.${conf.mapper_package}.${beanName}Mapper;
import java.util.List;
import ${conf.resp_package}.${beanName}Resp;
import ${conf.req_package}.${beanName}ListReq;
import ${conf.req_package}.${beanName}AddReq;
import ${conf.req_package}.${beanName}UpdateReq;
import com.gateon.hw.base.vo.Result;
import org.springframework.beans.BeanUtils;

/**
*  ${table.tableDesc}实体bean
* Created by ${conf.code_author} on ${.now}
*/
@RestController
public class ${table.beanName}Provider implements ${table.beanName}Client{
    @Autowired
    private I${beanName}Service ${beanName}Service;

    @Override
    public Result<IPage<${beanName}Resp>> list(@RequestBody ${beanName}ListReq req) {
        return ${beanName}Service.list(req);
    }

    @Override
    public Result<${beanName}Resp> detail(@PathVariable("id") Long id) {
        return ${beanName}Service.detail(id);
    }

    @Override
    public Result insert(@RequestBody ${beanName}AddReq req) {
        return ${beanName}Service.insert(req);
    }

    @Override
    public Result update(@RequestBody ${beanName}UpdateReq req) {
        return ${beanName}Service.update(req);
    }

    @Override
    public Result delete(@PathVariable("id") Long  id) {
        return ${beanName}Service.delete(id);
    }

}
